<?php
/**
* Copyright (c) 2002-2007 BioWare Corp.
* http://www.bigdaddymonitor.org
*
* This file is part of the BigDaddy Monitoring
* program. It is free software distributed under
* the terms of the BSD License. It is ditributed
* in the hopes that it will be useful, but
* WITHOUT ANY WARRANTY; without event the implied
* warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE.
*
* The BSD License is available from:
* http://www.opensource.org/licenses/bsd-license.php
**/
if ($nType == 8 && $nStartTime == 0 && $nEndTime ==0)
{
	$bNotShow = true;
		
}

if ($nType == 8)
{
	if ($nStartTime > 0 && $nEndTime > 0)
	{
		$sRangeStr = "<p><b>Range is: ".get_time_str($nStartTime, 1)." to ".get_time_str($nEndTime, 1)."</b></p>";
	}
	
	if ($nStartTime > 0)
	{
		$aStart = getdate($nStartTime);
		$aStart["hours"]+=1;

	}
	else
	{
		$aStart = getdate(time()-7200);

	}
	
	if ($nEndTime > 0)
	{
		$aEnd = getdate($nEndTime);
	}
	else
	{
		$aEnd = getdate(time()-3600);
	}
	
	
	
	?>
	
	<?=$sRangeStr;?>
	
	<form name="f" method="post" action = "<?=$_SERVER["PHP_SELF"]."?$sQueryString&type=8";?>">
	<table border="0">
	<tr>
	<td>
	<p>Start Date (m/d/y): </p>
	</td>
	<td><input type="text" name="startDate" value="<?=$aStart["mon"]."/".$aStart["mday"]."/".$aStart["year"];?>" size="15"> hour (24h) <input type="text" name="startHour" value="<?=$aStart["hours"];?>" size="2">:00</td>
	</tr>
	<tr>
	<td>
	<p>End Date (m/d/y):</p></td><td> <input type="text" name="endDate" value="<?=$aEnd["mon"]."/".$aEnd["mday"]."/".$aEnd["year"];?>" size="15"> hour (24h) <input type="text" name="endHour" value="<?=$aEnd["hours"];?>"  size="2">:00 &nbsp;&nbsp;<input type="submit" value="submit"></td>
	</tr>
	</table>
	
	
	</form>
	
	<?
	
}
?>
